var result = "http://47.108.197.28:8000/top250"
var ad = "http://47.108.197.28:8000/ad"

$ajax({
    url:result,
    success:res=>{
        var result = res.result;
        result.forEach((item,index)=>{
            var{pic,title,raiting,slogo,evaluate,labels} = item;
            labels = labels.join("/");
            var temple = ` 
                <div class="item">
                    <p>${index+1}</p>
                    <div class="pic"><img src="https://images.weserv.nl/?url=${pic}" alt=""></div>
                    <div class="text">
                        <a href="#">${title}</a>
                        <p class="instruct">${labels}</p>
                        <div class="commentary">
                            <p>${raiting}</p>
                            <p>${evaluate}人评价</p>
                        </div>
                        <p>${slogo}</p>
                    </div>
                </div>
            `
            $("#cl").append(temple);
        })
    }
})

$ajax({
    url:ad,
    success:res=>{
        var ad = res.result;
        var{title,erweima,logo,labels} = ad;
        var temple = `
            <p class="title">${title}</p>
            <div class="cr_text">
                <img src="${erweima}" alt="">
                <img src="${logo}" alt="">
                <div>
                    <p>${labels[0]}</p>
                    <p>${labels[1]}</p>
                </div>
            </div>
        `
        $("#cr").append(temple);
    }
})